Skip to content

Docs: fix WaitForExternalEvent references and add FIFO queue sample - #1368

Merged
Chris Gillum (cgillum) merged 7 commits into
mainfrom
docs/fix-waitforexternalevent
Jun 24, 2026
Merged

Chris Gillum (cgillum) merged 7 commits into
mainfrom
docs/fix-waitforexternalevent

Conversation

@cgillum

@cgillum Chris Gillum (cgillum) commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

The docs used a WaitForExternalEvent API that doesn't exist in DTFx. This updates the affected samples and API references across the docs to use the real OnEvent + TaskCompletionSource pattern.

While in here, I also added a FIFO job queue sample to the eternal orchestrations guide showing per-key serialization with ContinueAsNew.

Files touched:

  • docs/concepts/orchestrations.md
  • docs/concepts/deterministic-constraints.md
  • docs/features/eternal-orchestrations.md
  • docs/features/external-events.md (typed-event guidance and TrySetResult usage)
  • docs/features/timers.md
  • docs/getting-started/quickstart.md
  • samples/DurableTask.Samples/README.md (replaced fictional/duplicated code blocks with descriptions linking to the real sample source and docs)

DTFx has no WaitForExternalEvent helper. Update the docs samples and API references to use the real OnEvent + TaskCompletionSource pattern, and add a FIFO job queue sample to the eternal orchestrations guide.
Copilot AI review requested due to automatic review settings June 15, 2026 18:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Durable Task Framework (DTFx) documentation to remove references to a non-existent WaitForExternalEvent API and replace those examples with the supported OnEvent + TaskCompletionSource external event pattern. It also adds a new FIFO-per-key job queue sample to the eternal orchestrations guide.

Changes:

  • Removed WaitForExternalEvent mentions from quickstart/determinism docs.
  • Rewrote multiple timer/orchestration samples to use OnEvent + TaskCompletionSource.
  • Added a FIFO queue sample showing per-key serialization using ContinueAsNew.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
docs/getting-started/quickstart.md Removes WaitForExternalEvent from the API list in the quickstart narrative.
docs/concepts/deterministic-constraints.md Removes WaitForExternalEvent from the “durable operations” list.
docs/concepts/orchestrations.md Updates external event and human-interaction examples to the OnEvent + TaskCompletionSource pattern.
docs/features/timers.md Updates timer + external-event samples and adds/adjusts guidance around cancellation patterns.
docs/features/eternal-orchestrations.md Updates event-driven eternal orchestration examples and adds a FIFO queue sample using ContinueAsNew.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/features/timers.md Resolved
Comment thread docs/features/timers.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/concepts/orchestrations.md Resolved
Comment thread docs/concepts/orchestrations.md Resolved
Comment thread docs/concepts/orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Address Copilot review feedback on PR #1368. Use the 4-parameter TaskOrchestration<TResult,TInput,TEvent,TStatus> base so the framework deserializes event payloads and OnEvent receives a typed value (the prior string + manual MessageDataConverter.Deserialize pattern would throw for object payloads). Use TrySetResult instead of SetResult for idempotency against duplicate/late events, return default instead of null for generic results, and make the Cancel Unused Timers snippet self-contained.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Comment thread docs/features/timers.md Resolved
Comment thread docs/concepts/orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/features/external-events.md Resolved
…payload

Address round 2 Copilot review feedback on PR #1368. Create the TaskCompletionSource before awaiting any activity so events raised while an activity runs are captured by OnEvent instead of dropped. Propagate the typed event value in the graceful-termination sample, and correct the MaxUpdatesPerGeneration comment to reflect that ContinueAsNew always runs each generation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread docs/features/external-events.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread docs/concepts/orchestrations.md Resolved

@nytian Naiyuan Tian (nytian) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left two non-blocking comments. Thanks!

Comment thread docs/features/eternal-orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread samples/DurableTask.Samples/README.md Resolved
Comment thread samples/DurableTask.Samples/README.md Resolved
Comment thread samples/DurableTask.Samples/README.md Resolved
Comment thread docs/concepts/orchestrations.md Resolved
Comment thread docs/features/eternal-orchestrations.md Resolved
@cgillum
Chris Gillum (cgillum) merged commit 5217032 into main Jun 24, 2026
47 checks passed
@cgillum
Chris Gillum (cgillum) deleted the docs/fix-waitforexternalevent branch June 24, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants